//
//  mm_preViewPicturesViewController.h
//  HondaPro_2
//
//  Created by Eric on 13-7-5.
//  Copyright (c) 2013年 glendale. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "mm_SLCoverFlowView.h"
#import "mm_SLCoverView.h"
#import "mm_picRecodeDataModel.h"
#import "HelpClass.h"

#import "webConfig.h"
#import "webService.h"
#import "SVProgressHUD.h"

@interface mm_preViewPicturesViewController : UIViewController <UIGestureRecognizerDelegate>
{
    mm_SLCoverFlowView *_coverFlowView;
    
    //编辑图片的属性
    BOOL _picMode;
    NSInteger _picIndexToDel;
    
    //存储要删除的索引数组
    NSMutableArray *_arrAllPicIndexToDel;
    
    //要删除的图片个数
    NSInteger _nCountPicToDel;
}

@property (assign,nonatomic) int nPicNums;

@property (assign,nonatomic) BOOL nLimitOfAuthority;

@property (strong, nonatomic) IBOutlet UIButton *editBtnIns;
@property (strong, nonatomic) IBOutlet UIButton *deleteBtnIns;
@property (strong, nonatomic) IBOutlet UIButton *cancelBtnIns;

//按钮回调方法
- (IBAction)editBtnPressed:(UIButton *)sender;
- (IBAction)deleteBtnPressed:(UIButton *)sender;
- (IBAction)cancelBtnPressed:(UIButton *)sender;

//imageView添加的手势回调方法
-(void)SelectTap:(UITapGestureRecognizer*)recognizer;

//初始化设置
-(void)setUpInit;

//创建标题
-(void)createTitle;

- (IBAction)backBtnPressed:(UIButton *)sender;
- (IBAction)homeBtnPressed:(UIButton *)sender;

//调用图片删除接口的回调方法
-(void)getDeleteServerMsg:(NSNotification *)notification;
//注册消息
-(void)addAllObserver;
//移除消息
-(void)removeAllObserver;
//设置整个界面数据
-(void)setUpAllThePicScanData;
//更新图片预览界面
-(void)updateAllThePicScan;
//通过本类中的UIimageView,找到其再界面中的编号
-(NSInteger)imgViewsIndexInPicModelByImgView:(UIImageView *)imgView;
//根据编号，由数据模型中取得图片名称,xxxx.jpg
-(NSString *)picNameByIndex:(NSInteger)index;
//获取图片名xxxx，参数为xxxx.jpg
-(NSString *)picPureNameByOriginalName:(NSString *)picName;

//将故障点中的所有图片拿出来组成一个行的列表
-(NSArray *)arrPicsInOutCheckList;
//通过传入的索引 i 返回故障点中图片的名字STR
-(NSString *)returnImageNameFromOutCheckListByImageIndex:(NSInteger)indexXingCan;
//通过传入的索引 i 返回故障点的标记编号（名称）
-(NSString *)returnFaultyNameFromOutCheckListByImageIndex:(NSInteger)indexXingCan;
//通过传入的索引 i 返回故障点的备注
-(NSString *)returnFaultyRemarkFromOutCheckListByImageIndex:(NSInteger)indexXingCan;
//通过传入的索引 i 删除故障点对应的图片
-(BOOL)deleteTheImageFromOutCheckListByImageIndex:(NSInteger)indexXingCan;

//删除的项目是否在选中列表中，是的话返回数组的编号,否则返回-1
-(NSInteger)picIndexInDelArrayByReference:(NSInteger)_indexXingCan;
//重新标注要删除的图片图标
-(void)remarkAllThePicSmallIcon;

@end
